package com.isias.system.Config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MyWebConfigurer implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {

        /** 本地文件上传路径 */
        // WenJianConfig.getProfile() = 你本地存储的位置
        registry.addResourceHandler(WenJianConfig.getUrl() + "/**")
                .addResourceLocations("file:" + WenJianConfig.getProfile() + "/");
    }

}
